package com.alex.xmlyfm.entities.discoverrecommend;

import com.alex.xmlyfm.entities.AlbumBasic;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by
 * Author: alex
 * Email:
 * Date: 15-10-21.
 */

/**
 * 发现 推荐 内部一个专辑推荐，组合成呢过一个小编推荐
 */
public class AlbumRecommend extends AlbumBasic {
    /*
    {

        "playsCounts": 917714,
        "isFinished": 0,
        "trackId": 7898099,
        "trackTitle": "几米：音乐与绘本的美好邂逅"
      }
     */

    private long playsCounts;

    private int isFinished;

    private long trackId;

    private String trackTitle;

    public long getPlaysCounts() {
        return playsCounts;
    }

    public void setPlaysCounts(long playsCounts) {
        this.playsCounts = playsCounts;
    }

    public int getIsFinished() {
        return isFinished;
    }

    public void setIsFinished(int isFinished) {
        this.isFinished = isFinished;
    }

    public long getTrackId() {
        return trackId;
    }

    public void setTrackId(long trackId) {
        this.trackId = trackId;
    }

    public String getTrackTitle() {
        return trackTitle;
    }

    public void setTrackTitle(String trackTitle) {
        this.trackTitle = trackTitle;
    }

    public void parseJSON(JSONObject json) throws JSONException {
        super.parseJSON(json);
        if (json != null) {
            playsCounts = json.optLong("playsCounts",0);

            isFinished = json.optInt("isFinished", 0);

            trackId = json.getLong("trackId");

            trackTitle = json.getString("trackTitle");
        }
    }
}
